import time

from functools import wraps

def timethis(func):
    '''
    Decorator that reports the execution time
    '''
    @wraps(func)
    def execute_time(*args,**kwargs):
        start = time.time()
        result = func(*args,**kwargs)
        end = time.time()
        print(func.__name__,end-start)
        return result
    return execute_time
@timethis
def func1():
    total = 0
    for i in range(900000):
        total += i
    return

@timethis
def func2():
    total = 0
    for i in range(9999999):
        total += i
    return

if __name__ == '__main__':
    func1()
    func2()